package jumpingnotes.model.entity;

// Generated Aug 10, 2008 2:18:38 PM by Hibernate Tools 3.2.1.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * BookVersion generated by hbm2java
 */
@Entity
@Table(name = "book_version", catalog = "jumping_notes")
public class BookVersion implements java.io.Serializable
{

	private Integer bookVersionId;
	private Book book;
	private String property;
	private String value;
	private Integer weight;
	private Integer memberId;
	private Date createTime;
	private Date updateTime;

	public BookVersion()
	{
	}

	public BookVersion(Book book, String property)
	{
		this.book = book;
		this.property = property;
	}

	public BookVersion(Book book, String property, String value, Integer weight, Integer memberId, Date createTime,
			Date updateTime)
	{
		this.book = book;
		this.property = property;
		this.value = value;
		this.weight = weight;
		this.memberId = memberId;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "book_version_id", unique = true, nullable = false)
	public Integer getBookVersionId()
	{
		return this.bookVersionId;
	}

	public void setBookVersionId(Integer bookVersionId)
	{
		this.bookVersionId = bookVersionId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "book_id", nullable = false)
	public Book getBook()
	{
		return this.book;
	}

	public void setBook(Book book)
	{
		this.book = book;
	}

	@Column(name = "property", nullable = false, length = 32)
	public String getProperty()
	{
		return this.property;
	}

	public void setProperty(String property)
	{
		this.property = property;
	}

	@Column(name = "value", length = 65535)
	public String getValue()
	{
		return this.value;
	}

	public void setValue(String value)
	{
		this.value = value;
	}

	@Column(name = "weight")
	public Integer getWeight()
	{
		return this.weight;
	}

	public void setWeight(Integer weight)
	{
		this.weight = weight;
	}

	@Column(name = "member_id")
	public Integer getMemberId()
	{
		return this.memberId;
	}

	public void setMemberId(Integer memberId)
	{
		this.memberId = memberId;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", length = 19)
	public Date getCreateTime()
	{
		return this.createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time", length = 19)
	public Date getUpdateTime()
	{
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

}
